package com.zqu.service.impl;

import com.zqu.mapper.FollowRecordsMapper;
import com.zqu.pojo.FollowRecords;
import com.zqu.service.FollowRecordsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FollowRecordsServiceImpl implements FollowRecordsService {
    @Resource
    private FollowRecordsMapper followRecordsMapper;
    @Override
    public FollowRecords findT(long id) {
        return followRecordsMapper.selectTById(id);
    }

    @Override
    public List<FollowRecords> selectList(FollowRecords followRecords) {
        return followRecordsMapper.selectList(followRecords);
    }

    @Override
    public boolean insertT(FollowRecords followRecords) {
        int flag = followRecordsMapper.insertT(followRecords);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateT(FollowRecords followRecords) {
        int flag = followRecordsMapper.updateT(followRecords);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteT(long id) {
        int flag = followRecordsMapper.deleteT(id);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTByIds(String[] ids) {
        int flag = followRecordsMapper.deleteTByIds(ids);
        if(flag>0){
            return true;
        }
        return false;
    }
}
